<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes gun {
            from {
                transform: translate(600px, 0);
            }

            to {
                transform: translate(-600px, 0);
            }
        }

        @keyframes gunp {
            from {
                transform: translate(600px, -56px);
            }

            to {
                transform: translate(-600px, -56px);
            }
        }

        .w {
            overflow: hidden;
            width: 600px;
            height: 700px;
            margin: 0 auto;
            background-color: #f7f7f7;
        }

        .h {
            position: relative;
            margin-top: 100px;
            height: 40px;
            line-height: 40px;
        }

        .h div {
            position: absolute;
            left: 0;
            top: 0;
            height: 40px;
            width: 100px;
            overflow: hidden;
            background-color: rgb(250, 163, 1);
        }

        .p {
            /* position: absolute;
    left: 0;
    top: 0px; */

            animation: gun 6s linear infinite;
            font-size: 16px;
            transform: translate(600px, 0);
        }

        .b {
            /* position: absolute;
            left: 0;
            top: 0%;
            margin-top: 20px; */
            animation: gunp 6s linear infinite 3s;
            font-size: 16px;
            transform: translate(600px, 0px);
        }
    </style>
</head>

<body>
    <div class="w">
        <div class="h">
            <p class="p">从前有座山，山里有座庙，庙里有个页面找呀找不到</p>
            <p class="b">从前有座山，山里有座庙，庙里有个页面找呀找不到</p>
            <div></div>

        </div>
    </div>
</body>

</html>